﻿using System;
using System.Runtime.Serialization;
using System.Security.Permissions;

namespace LordJS.Exceptions
{
    [Serializable]
    public class DashboardException : Exception
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Don't want as static")]
        public virtual int HttpStatusCode
        {
            get { return (int)System.Net.HttpStatusCode.Forbidden; }
        }

        private DashboardException()
        {
        }

        public DashboardException(string message)
            : base(message)
        {
        }

        public DashboardException(string message, Exception innerException)
            : base(message, innerException)
        {
        }

        protected DashboardException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

        [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
        public override void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            base.GetObjectData(info, context);
        }
    }
}